from django import forms
from django.utils.translation import ugettext as _

tunits = (
    ('d', "m2/d"),
    ('h', "m2/h")
    )
qunits = (
    ('d', "m3/d"),
    ('h', "m3/h"),
    ('s', "m3/s"),
    ('ls', "L/s")
    )
kunits = (
    ('d', "m/d"),
    ('h', "m/h"),
    ('s', "m/s"),
    )

# Acuiferos Permanentes
class GC_AcPC(forms.Form):
    """
    Class that models the form for permanent confinated aquifers
    """
    Q = forms.FloatField(label = _(r"Cuadal ( Q )"), required=False)
    QU = forms.ChoiceField(label = "", choices = qunits, required=False)
    T = forms.FloatField(label = _(r"Transmisividad ( T )"), required=False)
    TU = forms.ChoiceField(label = "", choices = tunits, required=False)
    R = forms.FloatField(label = _(r"Radio influencia ( R )"))
    Ru = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    r = forms.FloatField(label = _(r"Distancia desde bombeo ( robs )"), required=False)
    ru = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    s = forms.FloatField(label = _(r"Descenso ( s )"), required=False)
    su = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    
class GC_AcPSC(forms.Form):
    """
    Class that models the form for permanent semiconfinated aquifers
    """
    Q = forms.FloatField(label = _(r"Cuadal ( Q )"), required=False)
    QU = forms.ChoiceField(label = "", choices = qunits, required=False)
    T = forms.FloatField(label = _(r"Transmisividad ( T )"), required=False)
    TU = forms.ChoiceField(label = "", choices = tunits, required=False)
    rp = forms.FloatField(label = _(r"Radio del pozo ( rp )"))
    rpu = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    r = forms.FloatField(label = _(r"Distancia hasta observacion ( r )"), required=False)
    ru = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    kp = forms.FloatField(label = _(r"Conductividad hidraulica del acuitardo ( kp )"), required=False)
    kpU = forms.ChoiceField(label = "", choices = kunits, required=False)
    bp = forms.FloatField(label = _(r"Espesor del acuitardo ( bp )"), required=False)
    bpu = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    B = forms.FloatField(label = _(r"Factor goteo ( B )"), required=False)
    Bu = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    s = forms.FloatField(label = _(r"Descenso ( s )"), required=False)
    su = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    
class GC_AcPL(forms.Form):
    """
    Class that models the form for permanent unconfinated aquifers
    """
    Q = forms.FloatField(label = _(r"Cuadal ( Q )"), required=False)
    QU = forms.ChoiceField(label = "", choices = qunits, required=False)
    k = forms.FloatField(label = _(r"Conductividad Hidraulica ( k )"), required=False)
    kU = forms.ChoiceField(label = "", choices = kunits, required=False)
    R = forms.FloatField(label = _(r"Radio de influencia ( R )"))
    Ru = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    ro = forms.FloatField(label = _(r"Distancia de observacion ( robs )"), required=False)
    rou = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    h = forms.FloatField(label = _(r"Altura Inicial ( H0 )"))
    hu = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    s = forms.FloatField(label = _(r"Descenso ( H - H0 )"), required=False)
    su = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    
# Acuiferos No permanentes!

class GC_AcNoPC(forms.Form):
    """
    Class that models the form for non permanent confinated aquifers
    """
    Q = forms.FloatField(label = _(r"Cuadal ( Q )"), required=False)
    QU = forms.ChoiceField(label = "", choices = qunits, required=False)
    T = forms.FloatField(label = _(r"Transmisividad ( T )"), required=False)
    TU = forms.ChoiceField(label = "", choices = tunits, required=False)
    t = forms.FloatField(label = _(r"Tiempo ( t )"))
    tu = forms.CharField(label = "", initial="d",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    r = forms.FloatField(label = _(r"Distancia desde bombeo ( r )"), required=False)
    ru = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    s = forms.FloatField(label = _(r"Descenso ( s )"), required=False)
    su = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    S = forms.FloatField(label = _(r"Coeficiente de Almacenamiento ( S )"), required=False)
    Su = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)

class GC_AcNoPSC(forms.Form):
    """
    Class that models the form for non permanent semiconfinated aquifers
    """
    Q = forms.FloatField(label = _(r"Cuadal ( Q )"), required=False)
    QU = forms.ChoiceField(label = "", choices = qunits, required=False)
    T = forms.FloatField(label = _(r"Transmisividad ( T )"), required=False)
    TU = forms.ChoiceField(label = "", choices = tunits, required=False)
    t = forms.FloatField(label = _(r"Tiempo ( t )"))
    tu = forms.CharField(label = "", initial="d",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    r = forms.FloatField(label = _(r"Distancia desde bombeo ( r )"), required=False)
    ru = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    B = forms.FloatField(label = _(r"Factor goteo ( B )"), required=False)
    Bu = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    s = forms.FloatField(label = _(r"Descenso ( s )"), required=False)
    su = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    S = forms.FloatField(label = _(r"Coeficiente de Almacenamiento ( S )"), required=False)
    Su = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    kp = forms.FloatField(label = _(r"Conductividad hidraulica del acuitardo ( kp )"), required=False)
    kpu = forms.ChoiceField(label = "", choices = kunits, required=False)
    bp = forms.FloatField(label = _(r"Espesor del acuitardo ( bp )"), required=False)
    bpu = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)

class GC_AcNoPL(forms.Form):
    """
    Class that models the form for non permanent unconfinated aquifers
    """
    Q = forms.FloatField(label = _(r"Cuadal ( Q )"), required=False)
    QU = forms.ChoiceField(label = "", choices = qunits, required=False)
    k = forms.FloatField(label = _(r"Conductividad Hidraulica ( k )"), required=False)
    kU = forms.ChoiceField(label = "", choices = kunits, required=False)
    t = forms.FloatField(label = _(r"Tiempo ( t )"))
    tu = forms.CharField(label = "", initial="d",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    r = forms.FloatField(label = _(r"Distancia desde bombeo ( r )"), required=False)
    ru = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    h = forms.FloatField(label = _(r"Altura Inicial ( H0 )"))
    hu = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    s = forms.FloatField(label = _(r"Descenso ( H - H0 )"), required=False)
    su = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
    S = forms.FloatField(label = _(r"Coeficiente de Almacenamiento ( S )"), required=False)
    Su = forms.CharField(label = "", initial="m",widget=forms.TextInput(attrs={'disabled':'disabled'}), required=False)
